package day03;

import java.util.ArrayList;
import java.util.Collections;

/**
 * Created by Shinelon on 2016/9/11.
 */
public class SortWork {
    public static void main(String[] args) {
        SortWork ccc = new SortWork();

        int[] bbb = {11,55,96,3,57,54,15,23};
         int [] ddd = ccc.sort(bbb);
        for (int i = 0; i < ddd.length; i++) {
            System.out.println(ddd[i]);
        }
    }
    public int[]  sort (int[] aaa ){
        for (int j = 0; j < aaa.length; j++) {
            for (int i = 0; i <aaa.length - 1; i++) {
                  if (aaa[i+1] < aaa[i]){
                    int tmp = aaa[i];
                    aaa[i] = aaa[i + 1];
                    aaa[i+1] = tmp;
                  }
            }
        }
       return aaa;
    }






}
